package com.neusoft.ysu.npms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.neusoft.ysu.npms.mapper.DepartmentMapper;
import com.neusoft.ysu.npms.mapper.RiskMapper;
import com.neusoft.ysu.npms.pojo.Department;
import com.neusoft.ysu.npms.pojo.Result;
import com.neusoft.ysu.npms.pojo.Risk;
import com.neusoft.ysu.npms.service.IRiskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 作者：刘金秋
 * @since 2024-06-18
 */
@Service
public class RiskServiceImpl extends ServiceImpl<RiskMapper, Risk> implements IRiskService {
    @Autowired
    RiskMapper riskMapper;

    @Override
    public Result add(Risk type) {
        return new Result<>(0, "", riskMapper.add(type));
    }
    @Override
    public Result deleteRisk(Risk risk){
        return new Result<>(0,"",riskMapper.deleteRisk(risk));
    }
    @Override
    public Result updateRisk(Risk risk){
        return new Result<>(0,"",riskMapper.updateRisk(risk));
    }
    @Override
    public Result selectAll(){
        return new Result<>(0,"",riskMapper.selectAll());
    }
    @Override
    public Result findById(Risk risk){
        return new Result<>(0,"",riskMapper.findById(risk));
    }

}
